package cn.kgc.javaweb.listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * @author: mosin
 * @version: v1.0  2022/9/13
 * SessionScopeListener  监听器
 * HttpSessionListener
 */
public class SessionScopeListener implements HttpSessionListener {

    // 监听session的创建
    @Override
    public void sessionCreated(HttpSessionEvent se) {
        System.out.println("一个会话对象被创建");
    }

    // 监听session的销毁
    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
        System.out.println("一个会话对象被销毁");
    }
}
